home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 August
/
Chip_1999-08_cd.bin
/
zkuste
/
MacOS
/
Files
/
His.sit
/
Hi's Universal Saver v.1.6.0 ∫
/
Parts to Install
/
Menu Events 1.3.1
/
Menu Events.h
< prev
next >
Wrap
Text File
|
1996-02-25
|
4KB
|
114 lines
/*______________________________________________________________________
Menu Events
Version 1.3
an AWOL Software Production
PO Box 24207
300 Eagleson Road
Kanata, Ontario, Canada K2M 2C3
Internet: AWOL@eworld.com
Copyright ⌐ 1994-6 Ross Brown. All rights reserved.
_____________________________________________________________________*/
/*______________________________________________________________________
'Menu Events'.h - Menu Events Definitions.
This file defines the Apple events which you can send to any
high-level-event-aware process when Menu Events is installed.
The Query Menu List event returns a list of menu info records,
each with ID, title, enabled/disabled status, and menu
definition procedure resource ID.
The Query Menu event, given a menu ID or title, returns a list
of menu item records, each with ID, title, enabled/disabled status,
mark character, icon number, style, and Command-key character.
It simulates a click in the menu bar to force the target to
updates its menus. You can optionally specify which modifier
keys (Shift, Control, Option, Command) are pressed at the time
of the simulated menu bar click.
The Select Menu Item event, given a menu ID or title and menu
item ID or item text, causes the target to act as if the given
item had been selected by the user. You can optionally specify
which modifier keys (Shift, Control, Option, Command) are pressed
at the time of the simulated menu item selection.
Use AppleScript's Script Editor or any Apple event tool to read
the dictionary for this suite of events from the Menu Events
Scripting Addition file. See the Menu Events Sample Script file
for an example of Menu event scripting. There is also a full
description of the Menu Events suite in the Menu Events Help file.
_____________________________________________________________________*/
#ifndef __MENU_EVENTS__
#define __MENU_EVENTS__
#ifndef __TYPES__
#include <Types.h>
#endif
/* Signature of the Menu Events extension. */
#define kMESignature 'M╛nu'
/* Gestalt selector and response bits for the Menu Events extension. */
#define gestaltMenuEventsAttr kMESignature
#define gestaltMEQueryEventSupport 0
#define gestaltMESelectEventSupport 1
/* Error codes returned by the Menu Events Apple event suite. */
#define noSuchMenuErr ( -15950 ) /* no such menu in menu bar */
#define noSuchMenuItemErr ( -15951 ) /* no such item in menu */
#define menuItemDisabledErr ( -15952 ) /* item is disabled */
#define menuEventPendingErr ( -15953 ) /* another menu event is pending */
#define nonStandardMenuErr ( -15954 ) /* obsolete, kept for compatibility */
#define menuMismatchErr ( -15955 ) /* menu ID does not match title */
#define menuItemMismatchErr ( -15956 ) /* menu item ID does not match item text */
/* Class, ID, and key definitions for the Menu Events Apple event suite. */
#define kMEEventClass kMESignature
#define kAEMEQueryMenuList 'qmn#'
#define kAEMEQueryMenu 'qmn '
#define kAEMESelectMenuItem 'semi'
#define keyMenuID 'mnid'
#define keyMenuTitle 'mnti'
#define keyMenuEnabled 'mnen'
#define keyMenuMDEFID 'mndf'
#define keyMenuItemID 'miid'
#define keyMenuItemText 'mite'
#define keyMenuItemEnabled 'mien'
#define keyMenuItemMark 'mima'
#define keyMenuItemIcon 'miic'
#define keyMenuItemStyle 'mist'
#define keyMenuItemCmd 'micm'
#define keyShiftKeyPressed 'shik'
#define keyControlKeyPressed 'conk'
#define keyOptionKeyPressed 'optk'
#define keyCommandKeyPressed 'comk'
#define keyMenuEventsTattoo kMESignature /* null; presence verifies handling of event */
#endif __MENU_EVENTS__